﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace WMS_IBLL
{
    public interface IBaseIBLL<T> where T : class, new()
    {
        Task<bool> CreateAsync(T entity);
        Task<bool> EditAsync(T entity);
        Task<T> FindAsync(int id);
        Task<int> FastInsertRangeAsync(List<T> list);
        Task<int> BulkUpdateAsync(List<T> list);
        Task<List<T>> QueryListAsync(Expression<Func<T, bool>> whereLambda);
        Task<int> DeleteRangeAsync(Expression<Func<T, bool>> whereLambda);
        Task<bool> DeleteByIdAsync(int id);
        Task<List<T>> BlockTranAsync(Expression<Func<T, bool>> whereLambda);
        Task<bool> QueryListIsExistAsync(Expression<Func<T, bool>> whereLambda);
        Task<List<T>> ToPageListAsync(int PageNow, int PageSize);
        Task<List<T>> ToWherePageListAsync(int PageNow, int PageSize, Expression<Func<T, bool>> whereLambda);
    }
}
